﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="testlinqDataSet" targetNamespace="http://tempuri.org/testlinqDataSet.xsd" xmlns:mstns="http://tempuri.org/testlinqDataSet.xsd" xmlns="http://tempuri.org/testlinqDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="testlinqConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="testlinqConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.InSys.Documents.Properties.Settings.GlobalReference.Default.testlinqConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="departmentTableAdapter" GeneratorDataComponentClassName="departmentTableAdapter" Name="department" UserDataComponentName="departmentTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="testlinqConnectionString (Settings)" DbObjectName="testlinq.dbo.department" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[department] WHERE (([id_department] = @Original_id_department) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_department" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_department" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_name" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="name" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_name" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="name" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[department] ([name]) VALUES (@name);
SELECT id_department, name FROM department WHERE (id_department = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@name" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="name" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT id_department, name FROM dbo.department</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[department] SET [name] = @name WHERE (([id_department] = @Original_id_department) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)));
SELECT id_department, name FROM department WHERE (id_department = @id_department)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@name" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="name" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_department" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_department" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_name" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="name" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_name" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="name" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="id_department" ColumnName="id_department" DataSourceName="testlinq.dbo.department" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id_department" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id_department" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="id_department" DataSetColumn="id_department" />
              <Mapping SourceColumn="name" DataSetColumn="name" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="documentTableAdapter" GeneratorDataComponentClassName="documentTableAdapter" Name="document" UserDataComponentName="documentTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="testlinqConnectionString (Settings)" DbObjectName="testlinq.dbo.[document]" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[document] WHERE (([id_document] = @Original_id_document) AND ((@IsNull_number = 1 AND [number] IS NULL) OR ([number] = @Original_number)) AND ((@IsNull_date = 1 AND [date] IS NULL) OR ([date] = @Original_date)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @Original_description)) AND ((@IsNull_enterprise = 1 AND [enterprise] IS NULL) OR ([enterprise] = @Original_enterprise)) AND ([finished] = @Original_finished))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_document" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_document" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_number" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="number" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_number" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="number" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_date" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="date" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_date" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="date" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_description" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="description" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_description" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="description" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_enterprise" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="enterprise" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_enterprise" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="enterprise" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_finished" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="finished" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[document] ([number], [date], [description], [enterprise], [finished]) VALUES (@number, @date, @description, @enterprise, @finished);
SELECT id_document, number, date, description, enterprise, finished FROM [document] WHERE (id_document = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@number" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="number" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@date" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="date" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@description" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="description" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@enterprise" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="enterprise" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@finished" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="finished" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT id_document, number, date, description, enterprise, finished FROM dbo.document</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[document] SET [number] = @number, [date] = @date, [description] = @description, [enterprise] = @enterprise, [finished] = @finished WHERE (([id_document] = @Original_id_document) AND ((@IsNull_number = 1 AND [number] IS NULL) OR ([number] = @Original_number)) AND ((@IsNull_date = 1 AND [date] IS NULL) OR ([date] = @Original_date)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @Original_description)) AND ((@IsNull_enterprise = 1 AND [enterprise] IS NULL) OR ([enterprise] = @Original_enterprise)) AND ([finished] = @Original_finished));
SELECT id_document, number, date, description, enterprise, finished FROM [document] WHERE (id_document = @id_document)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@number" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="number" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@date" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="date" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@description" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="description" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@enterprise" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="enterprise" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@finished" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="finished" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_document" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_document" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_number" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="number" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_number" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="number" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_date" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="date" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_date" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="date" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_description" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="description" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_description" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="description" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_enterprise" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="enterprise" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_enterprise" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="enterprise" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_finished" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="finished" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="id_document" ColumnName="id_document" DataSourceName="testlinq.dbo.[document]" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id_document" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id_document" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="id_document" DataSetColumn="id_document" />
              <Mapping SourceColumn="number" DataSetColumn="number" />
              <Mapping SourceColumn="date" DataSetColumn="date" />
              <Mapping SourceColumn="description" DataSetColumn="description" />
              <Mapping SourceColumn="enterprise" DataSetColumn="enterprise" />
              <Mapping SourceColumn="finished" DataSetColumn="finished" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="personTableAdapter" GeneratorDataComponentClassName="personTableAdapter" Name="person" UserDataComponentName="personTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="testlinqConnectionString (Settings)" DbObjectName="testlinq.dbo.person" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[person] WHERE (([id_person] = @Original_id_person) AND ((@IsNull_login = 1 AND [login] IS NULL) OR ([login] = @Original_login)) AND ((@IsNull_password = 1 AND [password] IS NULL) OR ([password] = @Original_password)))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_person" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_login" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="login" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_login" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="login" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_password" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="password" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_password" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="password" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[person] ([name], [login], [password]) VALUES (@name, @login, @password);
SELECT id_person, name, login, password FROM person WHERE (id_person = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@name" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="name" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@login" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="login" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@password" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="password" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT id_person, name, login, password FROM dbo.person</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[person] SET [name] = @name, [login] = @login, [password] = @password WHERE (([id_person] = @Original_id_person) AND ((@IsNull_login = 1 AND [login] IS NULL) OR ([login] = @Original_login)) AND ((@IsNull_password = 1 AND [password] IS NULL) OR ([password] = @Original_password)));
SELECT id_person, name, login, password FROM person WHERE (id_person = @id_person)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@name" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="name" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@login" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="login" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@password" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="password" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_person" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_login" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="login" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_login" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="login" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_password" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="password" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_password" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="password" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="id_person" ColumnName="id_person" DataSourceName="testlinq.dbo.person" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id_person" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="id_person" DataSetColumn="id_person" />
              <Mapping SourceColumn="name" DataSetColumn="name" />
              <Mapping SourceColumn="login" DataSetColumn="login" />
              <Mapping SourceColumn="password" DataSetColumn="password" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="person_departmentTableAdapter" GeneratorDataComponentClassName="person_departmentTableAdapter" Name="person_department" UserDataComponentName="person_departmentTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="testlinqConnectionString (Settings)" DbObjectName="testlinq.dbo.person_department" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[person_department] WHERE (([id_department] = @Original_id_department) AND ([id_person] = @Original_id_person) AND ([date] = @Original_date) AND ([id_departmentperson] = @Original_id_departmentperson))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_department" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_department" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_person" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_date" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="date" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_departmentperson" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_departmentperson" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[person_department] ([id_department], [id_person], [date]) VALUES (@id_department, @id_person, @date);
SELECT id_department, id_person, date, id_departmentperson FROM person_department WHERE (id_departmentperson = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id_department" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_department" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id_person" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@date" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="date" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT id_department, id_person, date, id_departmentperson FROM dbo.person_department</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[person_department] SET [id_department] = @id_department, [id_person] = @id_person, [date] = @date WHERE (([id_department] = @Original_id_department) AND ([id_person] = @Original_id_person) AND ([date] = @Original_date) AND ([id_departmentperson] = @Original_id_departmentperson));
SELECT id_department, id_person, date, id_departmentperson FROM person_department WHERE (id_departmentperson = @id_departmentperson)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id_department" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_department" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id_person" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@date" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="date" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_department" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_department" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_person" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_date" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="date" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_departmentperson" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_departmentperson" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="id_departmentperson" ColumnName="id_departmentperson" DataSourceName="testlinq.dbo.person_department" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id_departmentperson" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id_departmentperson" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="id_department" DataSetColumn="id_department" />
              <Mapping SourceColumn="id_person" DataSetColumn="id_person" />
              <Mapping SourceColumn="date" DataSetColumn="date" />
              <Mapping SourceColumn="id_departmentperson" DataSetColumn="id_departmentperson" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="person_documentTableAdapter" GeneratorDataComponentClassName="person_documentTableAdapter" Name="person_document" UserDataComponentName="person_documentTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="testlinqConnectionString (Settings)" DbObjectName="testlinq.dbo.person_document" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[person_document] WHERE (([id_operation] = @Original_id_operation) AND ([id_person] = @Original_id_person) AND ([id_document] = @Original_id_document) AND ([datetime] = @Original_datetime) AND ((@IsNull_id_description = 1 AND [id_description] IS NULL) OR ([id_description] = @Original_id_description)))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_operation" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_operation" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_person" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_document" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_document" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_datetime" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="datetime" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_id_description" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_description" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_description" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_description" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[person_document] ([id_person], [id_document], [datetime], [description], [id_description]) VALUES (@id_person, @id_document, @datetime, @description, @id_description);
SELECT id_operation, id_person, id_document, datetime, description, id_description FROM person_document WHERE (id_operation = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id_person" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id_document" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_document" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@datetime" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="datetime" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@description" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="description" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id_description" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_description" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT id_operation, id_person, id_document, datetime, description, id_description FROM dbo.person_document</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[person_document] SET [id_person] = @id_person, [id_document] = @id_document, [datetime] = @datetime, [description] = @description, [id_description] = @id_description WHERE (([id_operation] = @Original_id_operation) AND ([id_person] = @Original_id_person) AND ([id_document] = @Original_id_document) AND ([datetime] = @Original_datetime) AND ((@IsNull_id_description = 1 AND [id_description] IS NULL) OR ([id_description] = @Original_id_description)));
SELECT id_operation, id_person, id_document, datetime, description, id_description FROM person_document WHERE (id_operation = @id_operation)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id_person" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id_document" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_document" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@datetime" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="datetime" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@description" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="description" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id_description" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_description" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_operation" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_operation" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_person" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_document" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_document" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_datetime" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="datetime" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_id_description" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_description" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_id_description" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id_description" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="id_operation" ColumnName="id_operation" DataSourceName="testlinq.dbo.person_document" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id_operation" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id_operation" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="id_operation" DataSetColumn="id_operation" />
              <Mapping SourceColumn="id_person" DataSetColumn="id_person" />
              <Mapping SourceColumn="id_document" DataSetColumn="id_document" />
              <Mapping SourceColumn="datetime" DataSetColumn="datetime" />
              <Mapping SourceColumn="description" DataSetColumn="description" />
              <Mapping SourceColumn="id_description" DataSetColumn="id_description" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DataTableMainReportTableAdapter" GeneratorDataComponentClassName="DataTableMainReportTableAdapter" Name="DataTableMainReport" UserDataComponentName="DataTableMainReportTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="testlinqConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT     [document].number, [document].date, [document].description, [document].enterprise, person.name, person_document.datetime, [document].number +' '+ cast([document].date as varchar) + ' '+[document].description +' '+  [document].enterprise as grp, 
                      person_document.description AS description_move, [document].id_document
FROM         [document] INNER JOIN
                      person_document ON [document].id_document = person_document.id_document INNER JOIN
                      person ON person_document.id_person = person.id_person
ORDER BY [document].id_document DESC, person_document.datetime DESC</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="number" DataSetColumn="number" />
              <Mapping SourceColumn="date" DataSetColumn="date" />
              <Mapping SourceColumn="description" DataSetColumn="description" />
              <Mapping SourceColumn="enterprise" DataSetColumn="enterprise" />
              <Mapping SourceColumn="name" DataSetColumn="name" />
              <Mapping SourceColumn="datetime" DataSetColumn="datetime" />
              <Mapping SourceColumn="description_move" DataSetColumn="description_move" />
              <Mapping SourceColumn="id_document" DataSetColumn="id_document" />
              <Mapping SourceColumn="grp" DataSetColumn="grp" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="LastDocumentsTableAdapter" GeneratorDataComponentClassName="LastDocumentsTableAdapter" Name="LastDocuments" UserDataComponentName="LastDocumentsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="testlinqConnectionString (Settings)" DbObjectName="testlinq.dbo.person_document" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        person_document.id_document
FROM            person_document INNER JOIN
                         person_document AS person_document_1 ON person_document.id_operation = person_document_1.id_operation</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="id_document" DataSetColumn="id_document" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DataTableCountAddedDocumentsTableAdapter" GeneratorDataComponentClassName="DataTableCountAddedDocumentsTableAdapter" Name="DataTableCountAddedDocuments" UserDataComponentName="DataTableCountAddedDocumentsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="testlinqConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>select person.name, c.value from person join
(
select a.id_person, count(a.id_document) as value from 
(
	select distinct b.id_person, b.id_document from person_document as b join 
		document on b.id_document=document.id_document where document.id_kindDocument = @kindDocument and
		b.datetime&gt;=@beg_date and b.datetime&lt;@end_date
) as a group by a.id_person
) as c on person.id_person=c.id_person</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="kindDocument" ColumnName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@kindDocument" Precision="0" Scale="0" Size="4" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="beg_date" ColumnName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@beg_date" Precision="0" Scale="0" Size="8" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="end_date" ColumnName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@end_date" Precision="0" Scale="0" Size="8" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="name" DataSetColumn="name" />
              <Mapping SourceColumn="value" DataSetColumn="value" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DataTableCountTotalDocumentByDateTableAdapter" GeneratorDataComponentClassName="DataTableCountTotalDocumentByDateTableAdapter" Name="DataTableCountTotalDocumentByDate" UserDataComponentName="DataTableCountTotalDocumentByDateTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="testlinqConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>select person.name, f.value from person join
(select e.id_person, count(e.id_person) as value from (select a.id_person, a.id_document, a.datetime from 
	(
		select b.id_person, b.id_document, b.datetime from person_document as b join document on document.id_document=b.id_document
			where document.id_kindDocument=@kindDocument and b.datetime &lt; @end_period) AS a 
			
	join
		(
			select c.id_document, max(c.datetime) as datetime from person_document as c group by c.id_document
		) as d on
	a.id_document = d.id_document and a.datetime = d.datetime) as e group by e.id_person) as f
	on person.id_person=f.id_person
		</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="kindDocument" ColumnName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@kindDocument" Precision="0" Scale="0" Size="4" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="end_period" ColumnName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@end_period" Precision="0" Scale="0" Size="8" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="name" DataSetColumn="name" />
              <Mapping SourceColumn="value" DataSetColumn="value" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DataTableListDocumentsByPersonTableAdapter" GeneratorDataComponentClassName="DataTableListDocumentsByPersonTableAdapter" Name="DataTableListDocumentsByPerson" UserDataComponentName="DataTableListDocumentsByPersonTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="testlinqConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        f.id_document, f.date, f.number, f.local_id, f.enterprise, f.description, f.address, f.finished, kindDocument.kind_document
FROM            (SELECT        a.id_person, a.id_document, a.datetime
                          FROM            (SELECT        id_person, id_document, datetime
                                                    FROM            person_document AS b
                                                    WHERE        (datetime &lt;@end_period)) AS a INNER JOIN
                                                        (SELECT        id_document, MAX(datetime) AS datetime
                                                          FROM            person_document AS c
                                                          GROUP BY id_document) AS d ON a.id_document = d.id_document AND a.datetime = d.datetime) AS e INNER JOIN
                         [document] AS f ON e.id_document = f.id_document INNER JOIN
                         kindDocument ON f.id_kindDocument = kindDocument.id
WHERE        (e.id_person = @id_person)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="id_person" ColumnName="id_person" DataSourceName="SELECT a.id_person, a.id_document, a.datetime FROM (SELECT id_person, id_document, datetime FROM person_document AS b WHERE (datetime &lt;@end_period)) AS a INNER JOIN (SELECT id_document, MAX(datetime) AS datetime FROM person_document AS c GROUP BY id_document) AS d ON a.id_document = d.id_document AND a.datetime = d.datetime" DataTypeServer="unknown" DbType="Int32" Direction="Input" ParameterName="@id_person" Precision="0" Scale="0" Size="0" SourceColumn="id_person" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="end_period" ColumnName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@end_period" Precision="0" Scale="0" Size="8" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="id_document" DataSetColumn="id_document" />
              <Mapping SourceColumn="date" DataSetColumn="date" />
              <Mapping SourceColumn="number" DataSetColumn="number" />
              <Mapping SourceColumn="local_id" DataSetColumn="local_id" />
              <Mapping SourceColumn="enterprise" DataSetColumn="enterprise" />
              <Mapping SourceColumn="description" DataSetColumn="description" />
              <Mapping SourceColumn="address" DataSetColumn="address" />
              <Mapping SourceColumn="finished" DataSetColumn="finished" />
              <Mapping SourceColumn="kind_document" DataSetColumn="kind_document" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="testlinqDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="True" msprop:Generator_DataSetName="testlinqDataSet" msprop:Generator_UserDSName="testlinqDataSet">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="department" msprop:Generator_UserTableName="department" msprop:Generator_RowEvArgName="departmentRowChangeEvent" msprop:Generator_TableVarName="tabledepartment" msprop:Generator_TablePropName="department" msprop:Generator_RowDeletingName="departmentRowDeleting" msprop:Generator_RowChangingName="departmentRowChanging" msprop:Generator_RowDeletedName="departmentRowDeleted" msprop:Generator_RowEvHandlerName="departmentRowChangeEventHandler" msprop:Generator_RowChangedName="departmentRowChanged" msprop:Generator_TableClassName="departmentDataTable" msprop:Generator_RowClassName="departmentRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id_department" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnid_department" msprop:Generator_ColumnPropNameInRow="id_department" msprop:Generator_ColumnPropNameInTable="id_departmentColumn" msprop:Generator_UserColumnName="id_department" type="xs:int" />
              <xs:element name="name" msprop:Generator_ColumnVarNameInTable="columnname" msprop:Generator_ColumnPropNameInRow="name" msprop:Generator_ColumnPropNameInTable="nameColumn" msprop:Generator_UserColumnName="name" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="document" msprop:Generator_UserTableName="document" msprop:Generator_RowEvArgName="documentRowChangeEvent" msprop:Generator_TableVarName="tabledocument" msprop:Generator_TablePropName="document" msprop:Generator_RowDeletingName="documentRowDeleting" msprop:Generator_RowChangingName="documentRowChanging" msprop:Generator_RowDeletedName="documentRowDeleted" msprop:Generator_RowEvHandlerName="documentRowChangeEventHandler" msprop:Generator_RowChangedName="documentRowChanged" msprop:Generator_TableClassName="documentDataTable" msprop:Generator_RowClassName="documentRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id_document" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnid_document" msprop:Generator_ColumnPropNameInRow="id_document" msprop:Generator_ColumnPropNameInTable="id_documentColumn" msprop:Generator_UserColumnName="id_document" type="xs:int" />
              <xs:element name="number" msprop:Generator_ColumnVarNameInTable="columnnumber" msprop:Generator_ColumnPropNameInRow="number" msprop:Generator_ColumnPropNameInTable="numberColumn" msprop:Generator_UserColumnName="number" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="date" msprop:Generator_ColumnVarNameInTable="columndate" msprop:Generator_ColumnPropNameInRow="date" msprop:Generator_ColumnPropNameInTable="dateColumn" msprop:Generator_UserColumnName="date" type="xs:dateTime" minOccurs="0" />
              <xs:element name="description" msprop:Generator_ColumnVarNameInTable="columndescription" msprop:Generator_ColumnPropNameInRow="description" msprop:Generator_ColumnPropNameInTable="descriptionColumn" msprop:Generator_UserColumnName="description" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="enterprise" msprop:Generator_ColumnVarNameInTable="columnenterprise" msprop:Generator_ColumnPropNameInRow="enterprise" msprop:Generator_ColumnPropNameInTable="enterpriseColumn" msprop:Generator_UserColumnName="enterprise" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="finished" msprop:Generator_ColumnVarNameInTable="columnfinished" msprop:Generator_ColumnPropNameInRow="finished" msprop:Generator_ColumnPropNameInTable="finishedColumn" msprop:Generator_UserColumnName="finished" type="xs:boolean" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="person" msprop:Generator_UserTableName="person" msprop:Generator_RowEvArgName="personRowChangeEvent" msprop:Generator_TableVarName="tableperson" msprop:Generator_TablePropName="person" msprop:Generator_RowDeletingName="personRowDeleting" msprop:Generator_RowChangingName="personRowChanging" msprop:Generator_RowDeletedName="personRowDeleted" msprop:Generator_RowEvHandlerName="personRowChangeEventHandler" msprop:Generator_RowChangedName="personRowChanged" msprop:Generator_TableClassName="personDataTable" msprop:Generator_RowClassName="personRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id_person" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnid_person" msprop:Generator_ColumnPropNameInRow="id_person" msprop:Generator_ColumnPropNameInTable="id_personColumn" msprop:Generator_UserColumnName="id_person" type="xs:int" />
              <xs:element name="name" msprop:Generator_ColumnVarNameInTable="columnname" msprop:Generator_ColumnPropNameInRow="name" msprop:Generator_ColumnPropNameInTable="nameColumn" msprop:Generator_UserColumnName="name" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="login" msprop:Generator_ColumnVarNameInTable="columnlogin" msprop:Generator_ColumnPropNameInRow="login" msprop:Generator_ColumnPropNameInTable="loginColumn" msprop:Generator_UserColumnName="login" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="password" msprop:Generator_ColumnVarNameInTable="columnpassword" msprop:Generator_ColumnPropNameInRow="password" msprop:Generator_ColumnPropNameInTable="passwordColumn" msprop:Generator_UserColumnName="password" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="person_department" msprop:Generator_UserTableName="person_department" msprop:Generator_RowEvArgName="person_departmentRowChangeEvent" msprop:Generator_TableVarName="tableperson_department" msprop:Generator_TablePropName="person_department" msprop:Generator_RowDeletingName="person_departmentRowDeleting" msprop:Generator_RowChangingName="person_departmentRowChanging" msprop:Generator_RowDeletedName="person_departmentRowDeleted" msprop:Generator_RowEvHandlerName="person_departmentRowChangeEventHandler" msprop:Generator_RowChangedName="person_departmentRowChanged" msprop:Generator_TableClassName="person_departmentDataTable" msprop:Generator_RowClassName="person_departmentRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id_department" msprop:Generator_ColumnVarNameInTable="columnid_department" msprop:Generator_ColumnPropNameInRow="id_department" msprop:Generator_ColumnPropNameInTable="id_departmentColumn" msprop:Generator_UserColumnName="id_department" type="xs:int" />
              <xs:element name="id_person" msprop:Generator_ColumnVarNameInTable="columnid_person" msprop:Generator_ColumnPropNameInRow="id_person" msprop:Generator_ColumnPropNameInTable="id_personColumn" msprop:Generator_UserColumnName="id_person" type="xs:int" />
              <xs:element name="date" msprop:Generator_ColumnVarNameInTable="columndate" msprop:Generator_ColumnPropNameInRow="date" msprop:Generator_ColumnPropNameInTable="dateColumn" msprop:Generator_UserColumnName="date" type="xs:dateTime" />
              <xs:element name="id_departmentperson" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnid_departmentperson" msprop:Generator_ColumnPropNameInRow="id_departmentperson" msprop:Generator_ColumnPropNameInTable="id_departmentpersonColumn" msprop:Generator_UserColumnName="id_departmentperson" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="person_document" msprop:Generator_UserTableName="person_document" msprop:Generator_RowEvArgName="person_documentRowChangeEvent" msprop:Generator_TableVarName="tableperson_document" msprop:Generator_TablePropName="person_document" msprop:Generator_RowDeletingName="person_documentRowDeleting" msprop:Generator_RowChangingName="person_documentRowChanging" msprop:Generator_RowDeletedName="person_documentRowDeleted" msprop:Generator_RowEvHandlerName="person_documentRowChangeEventHandler" msprop:Generator_RowChangedName="person_documentRowChanged" msprop:Generator_TableClassName="person_documentDataTable" msprop:Generator_RowClassName="person_documentRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id_operation" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnid_operation" msprop:Generator_ColumnPropNameInRow="id_operation" msprop:Generator_ColumnPropNameInTable="id_operationColumn" msprop:Generator_UserColumnName="id_operation" type="xs:int" />
              <xs:element name="id_person" msprop:Generator_ColumnVarNameInTable="columnid_person" msprop:Generator_ColumnPropNameInRow="id_person" msprop:Generator_ColumnPropNameInTable="id_personColumn" msprop:Generator_UserColumnName="id_person" type="xs:int" />
              <xs:element name="id_document" msprop:Generator_ColumnVarNameInTable="columnid_document" msprop:Generator_ColumnPropNameInRow="id_document" msprop:Generator_ColumnPropNameInTable="id_documentColumn" msprop:Generator_UserColumnName="id_document" type="xs:int" />
              <xs:element name="datetime" msprop:Generator_ColumnVarNameInTable="columndatetime" msprop:Generator_ColumnPropNameInRow="datetime" msprop:Generator_ColumnPropNameInTable="datetimeColumn" msprop:Generator_UserColumnName="datetime" type="xs:dateTime" />
              <xs:element name="description" msprop:Generator_ColumnVarNameInTable="columndescription" msprop:Generator_ColumnPropNameInRow="description" msprop:Generator_ColumnPropNameInTable="descriptionColumn" msprop:Generator_UserColumnName="description" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="id_description" msprop:Generator_ColumnVarNameInTable="columnid_description" msprop:Generator_ColumnPropNameInRow="id_description" msprop:Generator_ColumnPropNameInTable="id_descriptionColumn" msprop:Generator_UserColumnName="id_description" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="DataTableMainReport" msprop:Generator_UserTableName="DataTableMainReport" msprop:Generator_RowEvArgName="DataTableMainReportRowChangeEvent" msprop:Generator_TableVarName="tableDataTableMainReport" msprop:Generator_TablePropName="DataTableMainReport" msprop:Generator_RowDeletingName="DataTableMainReportRowDeleting" msprop:Generator_RowChangingName="DataTableMainReportRowChanging" msprop:Generator_RowDeletedName="DataTableMainReportRowDeleted" msprop:Generator_RowEvHandlerName="DataTableMainReportRowChangeEventHandler" msprop:Generator_RowChangedName="DataTableMainReportRowChanged" msprop:Generator_TableClassName="DataTableMainReportDataTable" msprop:Generator_RowClassName="DataTableMainReportRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="number" msprop:Generator_ColumnVarNameInTable="columnnumber" msprop:Generator_ColumnPropNameInRow="number" msprop:Generator_ColumnPropNameInTable="numberColumn" msprop:Generator_UserColumnName="number" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="date" msprop:Generator_ColumnVarNameInTable="columndate" msprop:Generator_ColumnPropNameInRow="date" msprop:Generator_ColumnPropNameInTable="dateColumn" msprop:Generator_UserColumnName="date" type="xs:dateTime" minOccurs="0" />
              <xs:element name="description" msprop:Generator_ColumnVarNameInTable="columndescription" msprop:Generator_ColumnPropNameInRow="description" msprop:Generator_ColumnPropNameInTable="descriptionColumn" msprop:Generator_UserColumnName="description" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="enterprise" msprop:Generator_ColumnVarNameInTable="columnenterprise" msprop:Generator_ColumnPropNameInRow="enterprise" msprop:Generator_ColumnPropNameInTable="enterpriseColumn" msprop:Generator_UserColumnName="enterprise" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="name" msprop:Generator_ColumnVarNameInTable="columnname" msprop:Generator_ColumnPropNameInRow="name" msprop:Generator_ColumnPropNameInTable="nameColumn" msprop:Generator_UserColumnName="name" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="datetime" msprop:Generator_ColumnVarNameInTable="columndatetime" msprop:Generator_ColumnPropNameInRow="datetime" msprop:Generator_ColumnPropNameInTable="datetimeColumn" msprop:Generator_UserColumnName="datetime" type="xs:dateTime" />
              <xs:element name="description_move" msprop:Generator_ColumnVarNameInTable="columndescription_move" msprop:Generator_ColumnPropNameInRow="description_move" msprop:Generator_ColumnPropNameInTable="description_moveColumn" msprop:Generator_UserColumnName="description_move" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="id_document" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnid_document" msprop:Generator_ColumnPropNameInRow="id_document" msprop:Generator_ColumnPropNameInTable="id_documentColumn" msprop:Generator_UserColumnName="id_document" type="xs:int" />
              <xs:element name="grp" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columngrp" msprop:Generator_ColumnPropNameInRow="grp" msprop:Generator_ColumnPropNameInTable="grpColumn" msprop:Generator_UserColumnName="grp" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="280" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="LastDocuments" msprop:Generator_UserTableName="LastDocuments" msprop:Generator_RowEvArgName="LastDocumentsRowChangeEvent" msprop:Generator_TableVarName="tableLastDocuments" msprop:Generator_TablePropName="LastDocuments" msprop:Generator_RowDeletingName="LastDocumentsRowDeleting" msprop:Generator_RowChangingName="LastDocumentsRowChanging" msprop:Generator_RowDeletedName="LastDocumentsRowDeleted" msprop:Generator_RowEvHandlerName="LastDocumentsRowChangeEventHandler" msprop:Generator_RowChangedName="LastDocumentsRowChanged" msprop:Generator_TableClassName="LastDocumentsDataTable" msprop:Generator_RowClassName="LastDocumentsRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id_document" msprop:Generator_ColumnVarNameInTable="columnid_document" msprop:Generator_ColumnPropNameInRow="id_document" msprop:Generator_ColumnPropNameInTable="id_documentColumn" msprop:Generator_UserColumnName="id_document" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="DataTableCountAddedDocuments" msprop:Generator_TableClassName="DataTableCountAddedDocumentsDataTable" msprop:Generator_RowEvArgName="DataTableCountAddedDocumentsRowChangeEvent" msprop:Generator_TableVarName="tableDataTableCountAddedDocuments" msprop:Generator_TablePropName="DataTableCountAddedDocuments" msprop:Generator_RowDeletingName="DataTableCountAddedDocumentsRowDeleting" msprop:Generator_UserTableName="DataTableCountAddedDocuments" msprop:Generator_RowChangingName="DataTableCountAddedDocumentsRowChanging" msprop:Generator_RowDeletedName="DataTableCountAddedDocumentsRowDeleted" msprop:Generator_RowChangedName="DataTableCountAddedDocumentsRowChanged" msprop:Generator_RowEvHandlerName="DataTableCountAddedDocumentsRowChangeEventHandler" msprop:Generator_RowClassName="DataTableCountAddedDocumentsRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="name" msprop:Generator_ColumnVarNameInTable="columnname" msprop:Generator_ColumnPropNameInRow="name" msprop:Generator_ColumnPropNameInTable="nameColumn" msprop:Generator_UserColumnName="name" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="value" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnvalue" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_UserColumnName="value" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="DataTableCountTotalDocumentByDate" msprop:Generator_TableClassName="DataTableCountTotalDocumentByDateDataTable" msprop:Generator_RowEvArgName="DataTableCountTotalDocumentByDateRowChangeEvent" msprop:Generator_TableVarName="tableDataTableCountTotalDocumentByDate" msprop:Generator_TablePropName="DataTableCountTotalDocumentByDate" msprop:Generator_RowDeletingName="DataTableCountTotalDocumentByDateRowDeleting" msprop:Generator_UserTableName="DataTableCountTotalDocumentByDate" msprop:Generator_RowChangingName="DataTableCountTotalDocumentByDateRowChanging" msprop:Generator_RowDeletedName="DataTableCountTotalDocumentByDateRowDeleted" msprop:Generator_RowChangedName="DataTableCountTotalDocumentByDateRowChanged" msprop:Generator_RowEvHandlerName="DataTableCountTotalDocumentByDateRowChangeEventHandler" msprop:Generator_RowClassName="DataTableCountTotalDocumentByDateRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="name" msprop:Generator_ColumnVarNameInTable="columnname" msprop:Generator_ColumnPropNameInRow="name" msprop:Generator_ColumnPropNameInTable="nameColumn" msprop:Generator_UserColumnName="name" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="value" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnvalue" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_UserColumnName="value" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="DataTableListDocumentsByPerson" msprop:Generator_TableClassName="DataTableListDocumentsByPersonDataTable" msprop:Generator_TableVarName="tableDataTableListDocumentsByPerson" msprop:Generator_TablePropName="DataTableListDocumentsByPerson" msprop:Generator_RowDeletingName="DataTableListDocumentsByPersonRowDeleting" msprop:Generator_UserTableName="DataTableListDocumentsByPerson" msprop:Generator_RowChangingName="DataTableListDocumentsByPersonRowChanging" msprop:Generator_RowEvHandlerName="DataTableListDocumentsByPersonRowChangeEventHandler" msprop:Generator_RowDeletedName="DataTableListDocumentsByPersonRowDeleted" msprop:Generator_RowEvArgName="DataTableListDocumentsByPersonRowChangeEvent" msprop:Generator_RowChangedName="DataTableListDocumentsByPersonRowChanged" msprop:Generator_RowClassName="DataTableListDocumentsByPersonRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id_document" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnid_document" msprop:Generator_ColumnPropNameInRow="id_document" msprop:Generator_ColumnPropNameInTable="id_documentColumn" msprop:Generator_UserColumnName="id_document" type="xs:int" />
              <xs:element name="date" msprop:Generator_ColumnVarNameInTable="columndate" msprop:Generator_ColumnPropNameInRow="date" msprop:Generator_ColumnPropNameInTable="dateColumn" msprop:Generator_UserColumnName="date" type="xs:dateTime" minOccurs="0" />
              <xs:element name="number" msprop:Generator_ColumnVarNameInTable="columnnumber" msprop:Generator_ColumnPropNameInRow="number" msprop:Generator_ColumnPropNameInTable="numberColumn" msprop:Generator_UserColumnName="number" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="local_id" msprop:Generator_ColumnVarNameInTable="columnlocal_id" msprop:Generator_ColumnPropNameInRow="local_id" msprop:Generator_ColumnPropNameInTable="local_idColumn" msprop:Generator_UserColumnName="local_id" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="enterprise" msprop:Generator_ColumnVarNameInTable="columnenterprise" msprop:Generator_ColumnPropNameInRow="enterprise" msprop:Generator_ColumnPropNameInTable="enterpriseColumn" msprop:Generator_UserColumnName="enterprise" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="description" msprop:Generator_ColumnVarNameInTable="columndescription" msprop:Generator_ColumnPropNameInRow="description" msprop:Generator_ColumnPropNameInTable="descriptionColumn" msprop:Generator_UserColumnName="description" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="address" msprop:Generator_ColumnVarNameInTable="columnaddress" msprop:Generator_ColumnPropNameInRow="address" msprop:Generator_ColumnPropNameInTable="addressColumn" msprop:Generator_UserColumnName="address">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="finished" msprop:Generator_ColumnVarNameInTable="columnfinished" msprop:Generator_ColumnPropNameInRow="finished" msprop:Generator_ColumnPropNameInTable="finishedColumn" msprop:Generator_UserColumnName="finished" type="xs:boolean" />
              <xs:element name="kind_document" msprop:Generator_ColumnVarNameInTable="columnkind_document" msprop:Generator_ColumnPropNameInRow="kind_document" msprop:Generator_ColumnPropNameInTable="kind_documentColumn" msprop:Generator_UserColumnName="kind_document" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:department" />
      <xs:field xpath="mstns:id_department" />
    </xs:unique>
    <xs:unique name="document_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:document" />
      <xs:field xpath="mstns:id_document" />
    </xs:unique>
    <xs:unique name="person_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:person" />
      <xs:field xpath="mstns:id_person" />
    </xs:unique>
    <xs:unique name="person_department_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:person_department" />
      <xs:field xpath="mstns:id_departmentperson" />
    </xs:unique>
    <xs:unique name="person_document_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:person_document" />
      <xs:field xpath="mstns:id_operation" />
    </xs:unique>
    <xs:unique name="DataTableListDocumentsByPerson_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:DataTableListDocumentsByPerson" />
      <xs:field xpath="mstns:id_document" />
    </xs:unique>
  </xs:element>
  <xs:annotation>
    <xs:appinfo>
      <msdata:Relationship name="FK_person_department_department" msdata:parent="department" msdata:child="person_department" msdata:parentkey="id_department" msdata:childkey="id_department" msprop:Generator_UserChildTable="person_department" msprop:Generator_ChildPropName="Getperson_departmentRows" msprop:Generator_ParentPropName="departmentRow" msprop:Generator_UserRelationName="FK_person_department_department" msprop:Generator_RelationVarName="relationFK_person_department_department" msprop:Generator_UserParentTable="department" />
      <msdata:Relationship name="FK_person_department_person" msdata:parent="person" msdata:child="person_department" msdata:parentkey="id_person" msdata:childkey="id_person" msprop:Generator_UserChildTable="person_department" msprop:Generator_ChildPropName="Getperson_departmentRows" msprop:Generator_ParentPropName="personRow" msprop:Generator_UserRelationName="FK_person_department_person" msprop:Generator_RelationVarName="relationFK_person_department_person" msprop:Generator_UserParentTable="person" />
      <msdata:Relationship name="FK_person_document_document" msdata:parent="document" msdata:child="person_document" msdata:parentkey="id_document" msdata:childkey="id_document" msprop:Generator_UserChildTable="person_document" msprop:Generator_ChildPropName="Getperson_documentRows" msprop:Generator_ParentPropName="documentRow" msprop:Generator_UserRelationName="FK_person_document_document" msprop:Generator_RelationVarName="relationFK_person_document_document" msprop:Generator_UserParentTable="document" />
      <msdata:Relationship name="FK_person_document_person" msdata:parent="person" msdata:child="person_document" msdata:parentkey="id_person" msdata:childkey="id_person" msprop:Generator_UserChildTable="person_document" msprop:Generator_ChildPropName="Getperson_documentRows" msprop:Generator_ParentPropName="personRow" msprop:Generator_UserRelationName="FK_person_document_person" msprop:Generator_RelationVarName="relationFK_person_document_person" msprop:Generator_UserParentTable="person" />
      <msdata:Relationship name="FK_person_document_document1" msdata:parent="document" msdata:child="LastDocuments" msdata:parentkey="id_document" msdata:childkey="id_document" msprop:Generator_UserChildTable="LastDocuments" msprop:Generator_ChildPropName="GetLastDocumentsRows" msprop:Generator_ParentPropName="documentRow" msprop:Generator_UserRelationName="FK_person_document_document1" msprop:Generator_RelationVarName="relationFK_person_document_document1" msprop:Generator_UserParentTable="document" />
      <msdata:Relationship name="FK_person_document_document2" msdata:parent="DataTableListDocumentsByPerson" msdata:child="person_document" msdata:parentkey="id_document" msdata:childkey="id_document" msprop:Generator_UserChildTable="person_document" msprop:Generator_ChildPropName="Getperson_documentRows" msprop:Generator_UserParentTable="DataTableListDocumentsByPerson" msprop:Generator_UserRelationName="FK_person_document_document2" msprop:Generator_RelationVarName="relationFK_person_document_document2" msprop:Generator_ParentPropName="DataTableListDocumentsByPersonRow" />
      <msdata:Relationship name="FK_person_document_document3" msdata:parent="DataTableListDocumentsByPerson" msdata:child="LastDocuments" msdata:parentkey="id_document" msdata:childkey="id_document" msprop:Generator_UserChildTable="LastDocuments" msprop:Generator_ChildPropName="GetLastDocumentsRows" msprop:Generator_UserParentTable="DataTableListDocumentsByPerson" msprop:Generator_UserRelationName="FK_person_document_document3" msprop:Generator_RelationVarName="relationFK_person_document_document3" msprop:Generator_ParentPropName="DataTableListDocumentsByPersonRow" />
    </xs:appinfo>
  </xs:annotation>
</xs:schema>